package main.Pets;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;

/**
 * Created by ChengGM on 2016/12/9.
 */
public class CollectionTest {


        public void display(Iterator<Pet> it){
            while (it.hasNext()){
                Pet p = it.next();
                System.out.println(p.id()+":"+p+" ");
            }
            System.out.println();
        }
        public void display(Collection<Pet> co){
            for(Pet pt :co){
                System.out.println(pt.id()+":"+pt+" ");
            }
            System.out.println();
        }

    public static void main(String[] args) {
        
    }
}
